home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / stevie.arc / TERM.H < prev    next >
Text File  |  1990-01-10  |  3KB  |  74 lines

  1. /*
  2.  * STEVIE - ST Editor for VI Enthusiasts   ...Tim Thompson...twitch!tjt...
  3.  *
  4.  * Extensive modifications by:  Tony Andrews       onecom!wldrdg!tony
  5.  * Turbo C 1.5 port by: Denny Muscatelli 061988
  6.  */
  7.  
  8. /*
  9.  * This file contains the machine dependent escape sequences that
  10.  * the editor needs to perform various operations. Some of the sequences
  11.  * here are optional. Anything not available should be indicated by
  12.  * a null string. In the case of insert/delete line sequences, the
  13.  * editor checks the capability and works around the deficiency, if
  14.  * necessary.
  15.  *
  16.  * Currently, insert/delete line sequences are used for screen scrolling.
  17.  * There are lots of terminals that have 'index' and 'reverse index'
  18.  * capabilities, but no line insert/delete. For this reason, the editor
  19.  * routines s_ins() and s_del() should be modified to use 'index'
  20.  * sequences when the line to be inserted or deleted line zero.
  21.  */
  22.  
  23. /*
  24.  * The macro names here correspond (more or less) to the actual ANSI names
  25.  */
  26.  
  27. #ifdef    ATARI
  28. #define    T_EL    "\033l"        /* erase the entire current line */
  29. #define    T_IL    "\033L"        /* insert one line */
  30. #define    T_DL    "\033M"        /* delete one line */
  31. #define    T_SC    "\033j"        /* save the cursor position */
  32. #define    T_ED    "\033E"        /* erase display (may optionally home cursor) */
  33. #define    T_RC    "\033k"        /* restore the cursor position */
  34. #define    T_CI    "\033f"        /* invisible cursor (very optional) */
  35. #define    T_CV    "\033e"        /* visible cursor (very optional) */
  36. #endif
  37.  
  38. #ifdef    UNIX
  39. /*
  40.  * The UNIX sequences are hard-wired for ansi-like terminals. I should
  41.  * really use termcap/terminfo, but the UNIX port was done for profiling,
  42.  * not for actual use, so it wasn't worth the effort.
  43.  */
  44. #define    T_EL    "\033[2K"    /* erase the entire current line */
  45. #define    T_IL    "\033[L"    /* insert one line */
  46. #define    T_DL    "\033[M"    /* delete one line */
  47. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  48. #define    T_SC    "\0337"        /* save the cursor position */
  49. #define    T_RC    "\0338"        /* restore the cursor position */
  50. #define    T_CI    ""        /* invisible cursor (very optional) */
  51. #define    T_CV    ""        /* visible cursor (very optional) */
  52. #endif
  53.  
  54. #ifdef    OS2
  55.  
  56. /* some work needs done here for use under Turbo C & MS/PC-DOS
  57.    6/14/88 - dlm */
  58.  
  59. /*
  60.  * The OS/2 ansi console driver is pretty deficient. No insert or delete line
  61.  * sequences. The erase line sequence only erases from the cursor to the end
  62.  * of the line. For our purposes that works out okay, since the only time
  63.  * T_EL is used is when the cursor is in column 0.
  64.  */
  65. #define    T_EL    "\033[K"    /* erase the entire current line */
  66. #define    T_IL    ""        /* insert one line */
  67. #define    T_DL    ""        /* delete one line */
  68. #define    T_ED    "\033[2J"    /* erase display (may optionally home cursor) */
  69. #define    T_SC    "\033[s"    /* save the cursor position */
  70. #define    T_RC    "\033[u"    /* restore the cursor position */
  71. #define    T_CI    ""        /* invisible cursor (very optional) */
  72. #define    T_CV    ""        /* visible cursor (very optional) */
  73. #endif
  74.